package edu.mobbuzz.page.menu;

import com.sun.lwuit.Command;
import com.sun.lwuit.events.ActionListener;
import edu.mobbuzz.messaging.Messaging;


public abstract class Menu{
    
    public abstract String getMenuTitle();
    public abstract void showPage();
    
    private Command onlineCmd;
    private Command signOutCmd;
    private Command exitCmd;
    private ActionListener actionlistener;

    private Messaging messaging;

    public Command getSignOutCmd() {
        if(signOutCmd==null){
            signOutCmd = new Command("Sign Out");
        }
        return signOutCmd;
    }
    
    public Command getOnlineCmd() {
        if(onlineCmd==null){
            onlineCmd = new Command("Go Online"); 
        }        
        return onlineCmd;
    }
    public Command getExitCmd() {
        return exitCmd;
    }

    public void setExitCmd(Command exitCmd) {
        this.exitCmd = exitCmd;
    }
    
    
    public ActionListener getActionlistener() {
        return actionlistener;
    }

    public void setActionlistener(ActionListener actionlistener) {
        this.actionlistener = actionlistener;
    }  

    public Messaging getMessaging() {
        if(messaging==null){
            messaging = new Messaging();
        }
        return messaging;
    }

    public void setMessaging(Messaging messaging) {
        this.messaging = messaging;
    }

}

